<%--
  Created by IntelliJ IDEA.
  User: 35049
  Date: 2025/6/6
  Time: 21:02
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
  <title>登录 - 员工信息管理系统</title>
  <style>
    body {
      font-family: "Segoe UI", sans-serif;
      background-color: #f0f2f5;
      display: flex;
      justify-content: center;
      align-items: center;
      height: 100vh;
    }
    .login-container {
      background: white;
      padding: 40px 30px;
      border-radius: 10px;
      box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
      width: 320px;
    }
    .login-container h2 {
      margin-bottom: 25px;
      color: #333;
      text-align: center;
    }
    .login-container input[type="text"],
    .login-container input[type="password"] {
      width: 100%;
      padding: 12px;
      margin-bottom: 20px;
      border: 1px solid #ddd;
      border-radius: 5px;
    }
    .login-container input[type="submit"] {
      width: 100%;
      background-color: #007bff;
      color: white;
      padding: 12px;
      border: none;
      border-radius: 5px;
      font-weight: bold;
      cursor: pointer;
    }
    .error {
      color: red;
      margin-bottom: 10px;
      text-align: center;
    }
  </style>
</head>
<body>
<div class="login-container">
  <h2>系统登录</h2>
  <form method="post" action="login">
    <%
      String error = (String) request.getAttribute("error");
      if (error != null) {
    %>
    <div class="error"><%= error %></div>
    <%
      }
    %>
    <input type="text" name="username" placeholder="用户名" required />
    <input type="password" name="password" placeholder="密码" required />
    <input type="submit" value="登录" />
  </form>
</div>
</body>
</html>
